// register
import register from '../../../scripts/angular/register.js';

// css
import css from '../../../styles/main.css';

// config
import iRunner from '../config/app.config.js';

// routers
import AppRouter from '../routers/app.routers.js';

// run
import AppRun from '../routers/app.run.js';

// services
import authService from '../services/authService.js';
import tableService from '../services/tableService.js';
import arrayService from '../services/arrayService.js';
import dialogService from '../services/dialogService.js';
import fileReader from '../services/fileReader.js';
import timestampMarker from '../services/timestampMarker.js';
import scoreService from '../../score/services/scoreService.js';
import runnerService from  '../../runner/services/runnerService.js';
// directives
import iAlert from '../directives/ialert.directive.js';
import hoverText from '../directives/hovertext.directive.js';
import image404 from '../directives/image404.directive.js';
import runnerList from '../directives/runnerlist.directive.js';
import runner from '../directives/runner.directive.js';
import fileModel from '../directives/filemodel.directive.js';
import iHeight from '../directives/iheight.directive.js';
import miniNavbar from '../directives/mininavbar.directive.js';
import loadingText from '../directives/loadingtext.directive.js';
import textareaTitle from '../directives/textareatitle.directive.js';
import blink from '../directives/blink.directive.js';
import minimalizaSidebar from '../directives/minisidebar.directive.js';
import pageTitle from '../directives/pagetitle.directive.js';
import icheck from '../directives/icheck.directive.js';
import backToTop from '../directives/backtotop.directive.js';

// controllers
import AppController from '../controllers/app.controller.js';

// animations
import animate from '../animations/app.animation.js';

angular
    .module('App', [
    	'user.module', 
    	'company.module',
    	'race.module',
    	'course.module',
    	'cp.module',
    	'runner.module',
        'chip.module',
        'score.module',
        'equipment.module',
        'entry.module',
        'service.module',
        'sdk.module',
        'wificollect.module'
    ])
    .constant('iRunner', iRunner)
    .config(AppRouter)
    .run(AppRun)

    // factory
    .factory('fileReader', fileReader)

    // controller
    .controller('AppController', AppController)

    // animations
    .animation('.animate', animate);


register('App')
    
    // directives
    .directive('iAlert', iAlert)
    .directive('hoverText', hoverText)
    .directive('image404', image404)
    .directive('runnerList', runnerList)
    .directive('runner', runner)
    .directive('fileModel', fileModel)
    .directive('iHeight', iHeight)
    .directive('miniNavbar', miniNavbar)
    .directive('loadingText', loadingText)
    .directive('textareaTitle', textareaTitle)
    .directive('blink', blink)
    .directive('minimalizaSidebar', minimalizaSidebar)
    .directive('pageTitle', pageTitle)
    .directive('icheck', icheck)
    .directive('backToTop', backToTop)

    // factory
    .factory('authService', authService)
    .factory('tableService', tableService)
    .factory('arrayService', arrayService)
    .factory('dialogService', dialogService)
    .factory('timestampMarker', timestampMarker)
    .factory('scoreService', scoreService)
    .factory('runnerService', runnerService)